package com.bupt.websocket.bean;

import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * Created by ikariyui on 2018/4/16.
 */
public class WebSocketResult {
    //private static final ObjectMapper MAPPER = new ObjectMapper();

    public String success="-";
    public String uid="-";
    public String message="-";

    public String getSuccess() {
        return success;
    }

    public void setSuccess(String success) {
        this.success = success;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public WebSocketResult(){
    }
    public WebSocketResult(boolean i){
        if(i){
            this.success = "yes";
        }else{
            this.success = "no";
            this.message = "please loggin";
        }

    }

    @Override
    public String toString(){
        return "{\"success\":\""+success+"\",\"uid\":\""+uid+"\",\"message\":\""+message+"\"}";
    }
}
